package Lee_code;

public class Lee_300 {
    public int lengthOfLIS(int[] nums) {
        int len = nums.length;

        //初始化max_len
        int max_len = 0;

        int max_cur = 1;

        int last = nums[0];
        for(int i = 1; i < len; i++){
            if(nums[i] > last)
            {
                max_cur++;
                last = nums[i];
                max_len = Math.max(max_len, max_cur);
            }
            else
            {
                max_cur = 0;
                last = nums[i];
            }
        }
        return max_len;
    }

}
